<form class="form-horizontal" role="form" method="post" action="<?=site_url('order/edit/'.$order_id) ?>">  
  <div class="form-group">
    <label for="inputEmail3" class="col-sm-2 control-label">Sản phẩm</label>
    <div class="col-sm-3">
      <input id="disabledInput" type="text" name="title" class="form-control" placeholder="Sản phẩm" value="<?=$product->title ?>" required autofocus>
    </div>
  </div>       
  <div class="form-group">
    <label for="inputEmail3" class="col-sm-2 control-label">Khách hàng</label>
    <div class="col-sm-3">
      <input id="codeInput" type="text" name="customer_name" class="form-control" placeholder="Khách hàng" value="<?=$order->customer_name ?>" required>
    </div>
  </div>
  <div class="form-group">
    <label for="inputEmail3" class="col-sm-2 control-label">Số điện thoại</label>
    <div class="col-sm-3">
      <input id="codeInput" type="text" name="customer_phone" class="form-control" placeholder="Sđt" value="<?=$order->customer_phone ?>" required>
    </div>
  </div>
  <div class="form-group">
    <label for="inputEmail3" class="col-sm-2 control-label">Email</label>
    <div class="col-sm-3">
      <input id="codeInput" type="text" name="customer_email" class="form-control" placeholder="Email" value="<?=$order->customer_email ?>">
    </div>
  </div>
  <div class="form-group">
    <label for="inputEmail3" class="col-sm-2 control-label">Địa chỉ</label>
    <div class="col-sm-3">
      <input id="codeInput" type="text" name="address" class="form-control" placeholder="Địa chỉ" value="<?=$order->shipping_address ?>" required>
    </div>
  </div>
  <div class="form-group">
    <label for="inputEmail3" class="col-sm-2 control-label">Tình trạng</label>
    <?php
      $status = $order->status;
    ?>
    <div class="col-sm-3">
      <select class="form-control" name="status">
        <option>--Tất cả--</option>
        <option value="pending" <?=($status == 'pending') ? 'selected' : '' ?>>Đang chờ</option>
        <option value="failed" <?=($status == 'failed') ? 'selected' : '' ?>>Thất bại</option>
        <option value="process" <?=($status == 'process') ? 'selected' : '' ?>>Đang xử lý</option>
        <option value="completed" <?=($status == 'completed') ? 'selected' : '' ?>>Hoàn tất</option>
        <option value="refund" <?=($status == 'refund') ? 'selected' : '' ?>>Hoàn tiền</option>
        <option value="cancel" <?=($status == 'cancel') ? 'selected' : '' ?>>Hủy</option>
      </select>
    </div>
  </div>
  <div class="form-group">
    <label for="inputEmail3" class="col-sm-2 control-label">Ghi chú</label>
    <div class="col-sm-3">
      <textarea class="form-control" rows="3" name="note"><?=$order->note ?></textarea>
    </div>
  </div>
  <div class="form-group">
    <div class="col-sm-offset-2 col-sm-10">
      <button type="submit" name="editBtn" value="editBtnValue" class="btn btn-primary">Cập nhật</button>
    </div>
  </div>    
</form>

<div class="page-header">
  <h1>Sản phẩm</h1>
</div>
<div class="table-responsive">
  <table class="table table-bordered table-striped table-hover">
    <thead>
      <tr class="success" align="center">
        <td>Sản phẩm</td>               
        <td>Size</td>
        <td>Code</td>
        <td>Màu</td>                    
        <td>Kho</td>            
        <td>Ngày tạo</td>           
      </tr>
    </thead>
    <tbody>      
      <?php 
        $i = 1;     
        foreach ($exportCodes as $row):           
          echo '<tr align="center">
              <td>'.$row['product_name'].'</td>              
              <td>'.$row['product_size'].'</td>              
              <td>'.$row['product_code'].'</td>
              <td>'.$row['color'].'</td>
              <td>'.$row['storage'].'</td>              
              <td>'.$row['date_created'].'</td>              
              </tr>';               
          $i++;
        endforeach;
      ?>
    </tbody>
  </table>  
</div>  